#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct
{
	char nm[21];
	char xb;
	float sco[];
}stu;
int main()
{
   int n,i,maxi;
   stu *p;
   float *num,max;
   while((scanf("%d",&n))!=EOF)
   {
   	  max=0;
   	  p=(stu *)calloc(n,sizeof(stu));
   	  num=(float *)calloc(n,sizeof(float));
   	  for(i=0;i<n;i++)
   	  {
   	  	scanf("%s %s %f %f %f",&(p+i)->nm,&(p+i)->xb,&(p+i)->sco[0],&(p+i)->sco[1],&(p+i)->sco[2]);
   	    num[i]=(p+i)->sco[0]+(p+i)->sco[1]+(p+i)->sco[2];
   	    num[i]=num[i]/3.0;
		if(num[i]>=max&&(p+i)->xb=='f')
		{
			max=num[i];
			maxi=i;
		}
	  }
	  printf("I choose %s,and her score is %.2f.\n",(p+maxi)->nm,num[maxi]);
   }
   return 0;      
}